<?php
/**
 * Joomla! 1.5 component NS Pro
 *
 * @version $Id: view.html.php 2009-04-28 01:47:12 svn $
 * @author Christopher Mavros
 * @package Joomla
 * @subpackage NS Pro
 * @license GNU/GPL
 *
 */

// no direct access
defined('_JEXEC') or die('Restricted access');

// Import Joomla! libraries
jimport( 'joomla.application.component.view');
class NsproViewToolkit extends JView {

    function display($tpl = null)
    {

        JToolBarHelper::title(   JText::_( 'NS Pro Toolkit' ), 'impressions.png' );
        JToolBarHelper::preferences('com_nspro', 400);
        JToolBarHelper::help('../../help.html', true);
        JToolBarHelper::back();

        $db =& JFactory::getDBO();

        $query = 'SELECT * FROM `#__nspro_subs` ORDER BY `id` LIMIT 0 , 3000';
        if (isset($_GET["special"])) {
          if ($_GET["special"] == 'loadallsubs') {
            $query = 'SELECT * FROM `#__nspro_subs` ORDER BY `id`';
          }
        }

        $db->setQuery($query);

        $msubs = $db->loadObjectList();

        $this->assignRef('subs', $msubs);

        parent::display($tpl);
    }
}
?>